/*
 * 英才汇硕信息科技有限公司 拥有本软件版权 2021 并保留所有权利。
 * Copyright 2021, YCHS Information&Science Techology Co.,Ltd,
 * All right reserved.
 */
package com.ychs.lawyerback.mapper;


import com.ychs.lawyerback.dto.UserQueryDTO;
import com.ychs.lawyerback.pojo.UserEntity;
import com.ychs.lawyerback.vo.UserQuseyVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * @author mayujing
 * @version 1.0
 */


public interface UserMapper {


    //根据用户名查询用户，具体的查询要求在xml配置中
    UserEntity getUserByUsername(String username);

    List<UserQuseyVo> getUsersByCondition(UserQueryDTO userQueryDTO);

    int getCountByCondition(UserQueryDTO userQueryDTO);

    int addUser(UserEntity userEntity);

    int editUser(UserEntity userEntity);

    int countByUsername(String username);

    int deleteUser(List<Long> ids);

    @Select("select id,username,realname,phone,sex,flag,remark,roleId from user where id=#{userId}")
    UserEntity getUserByUserId(Long userId);
}
